fix(ci): make Docker restore-warm layer cover all core csprojs - #549
Merged
Conversation
The cache-warming restore layer in the three backend Dockerfiles copied only Nordstein.Core.Common and Nordstein.Core.Domain csprojs, but the product now also consumes Nordstein.Core.Storage, .Licensing, and .AI through the source-mode NordsteinCoreReference expansion. The copied set had drifted from the real dependency graph across three extraction tranches, so the early restore did not cover what its comment claimed. Replace the hand-listed core csproj COPY lines with a structure- preserving glob (COPY --parents core/*/*.csproj), so every current and future Nordstein.Core package is picked up automatically instead of silently drifting out of the layer. This needs the dockerfile:1 frontend, so add the syntax directive to each file (and drop the stray UTF-8 BOM on Proxytrace.Api/Dockerfile that would otherwise mask the directive). Fix the misleading comment to describe the real behavior. Fixes #544 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QZkxhC3XUtkmBosiTKvW32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The cache-warming
dotnet restorelayer in the three backend Dockerfiles copied onlyNordstein.Core.CommonandNordstein.Core.Domaincsprojs, although the product now also consumesNordstein.Core.Storage,Nordstein.Core.Licensing, andNordstein.Core.AIthrough the source-modeNordsteinCoreReferenceexpansion. The hand-listed set had drifted from the real dependency graph across three extraction tranches, so the early restore layer no longer did what its comment claimed.Fixes #544.
Changes
deploy/allinone/Dockerfile,Proxytrace.Api/Dockerfile,Proxytrace.Proxy.Api/Dockerfile: replaced the two hand-listed core csprojCOPYlines with a single structure-preserving glob —COPY --parents core/*/*.csproj ./— so every current and futureNordstein.Corepackage is warmed automatically instead of silently dropping out of the restore layer (drift-proof, as suggested in the issue).# syntax=docker/dockerfile:1parser directive to each file, whichCOPY --parentsrequires.Proxytrace.Api/Dockerfilethat would otherwise sit before the parser directive and mask it.The explicit
core/Directory.Build.props+core/Nordstein.Core.slncopy is kept as-is — the sln is what selects source mode, and neither file is a csproj matched by the glob.Why the glob works with structure preserved
Plain
COPY core/*/*.csproj core/flattens all matches into one directory, which breaks restore (each csproj must live in its own project directory).COPY --parentspreserves thecore/<Project>/path, so the source-modeProjectReferenceexpansion resolves for the whole graph.Verification
frontend/andsample-client/are Node images; neither copies core).imagejob path-triggers onDockerfilechanges: it does a realbuildxbuild of the all-in-one image (submodules recursive, socore/is populated and the glob matches) and smoke-tests the booted container — exercising the--parentsglob and the syntax directive end-to-end on this PR.Not user-facing (build-internal), so no CHANGELOG entry.
🤖 Generated with Claude Code
https://claude.ai/code/session_01QZkxhC3XUtkmBosiTKvW32
Generated by Claude Code